<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="author" content="wangbo">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    @keyframes bgc {
      /* 0%{background-color: aqua;} */
      100%{background-color: red;}
    }
    
    div{
      width: 200px;
      height: 200px;
      background-color: aqua;
      /* 默认end  end 结束之前的1步 start 直接到最后一步 */
    }
    #d1{ animation: bgc 3s steps(1,start); }
    #d2{ animation: bgc 3s steps(1,end);  }
  </style>
</head>
<body>
  <!-- 
  动画 规定某项 CSS 样式,就能创建由当前样式逐渐改为新样式的效果
   -->
   <div id="d1"></div>
   <div id="d2"></div>
</body>
</html>